package com.ljp.config;

import com.ljp.fault.retry.RetryStrategyKeys;
import com.ljp.fault.tolerant.TolerantStrategyKeys;
import com.ljp.loadbalancer.LoadBalancerKeys;
import com.ljp.serializer.SerializerKeys;
import lombok.Data;

/**
 * ClassName: RpcConfig
 * Package: com.ljp.config
 * Description: RPC框架配置类
 *
 * @Author: ljp
 * @Create: 2025/6/22-12:54
 * @Version: 1.0
 */
@Data
public class RpcConfig {
    /**
     * 名称
     */
    private String name = "ljp-rpc";

    /**
     * 版本
     */
    private String version = "1.0";

    /**
     * 服务器域名
     */
    private String serverHost = "localhost";

    /**
     * 服务器端口号
     */
    private int serverPort = 8080;

    /**
     * 是否开启模拟调用
     */
    private boolean mock = false;

    /**
     * 序列化器
     */
    private String serializer = SerializerKeys.JDK;

    /**
     * 负载均衡器
     */
    private String loadBalancer = LoadBalancerKeys.ROUND_ROBIN;

    /**
     * 重试策略
     */
    private String retryStrategy = RetryStrategyKeys.NO;

    /**
     * 容错策略
     */
    private String tolerantStrategy = TolerantStrategyKeys.FAIL_FAST;

    /**
     * 注册中心配置
     */
    private RegistryConfig registryConfig = new RegistryConfig();
}
